﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using com.ClickCricket.dal;

/// <summary>
/// Summary description for LoginService
/// </summary>
/// 
namespace com.ClickCricket.bll
{
    public class LoginService
    {
        private static LoginService instance;

        public static LoginService Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new LoginService();
                }
                return instance;
            }
        }

        private readonly ILoginProvider LoginProvider;

        public LoginService(ILoginProvider LoginProvider)
        {
            this.LoginProvider = LoginProvider;
        }

        public LoginService()
            : this(new LoginLinqProvider())
        {

        }

        public Login getUser(int userID)
        {
            return LoginProvider.getUser(userID);
        }
    }
}